package com.wms.modules.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.enums.RecordStatusEnu;
import com.wms.modules.entitis.WarehouseAreaMgmt;
import com.wms.modules.entitis.WarehouseMgmt;
import com.wms.modules.mapper.WarehouseAreaMgmtMapper;
import com.wms.modules.service.WarehouseAreaMgmtService;
import com.wms.modules.service.WarehouseMgmtService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: Z
 * @Date: 2024/6/23 16:05
 * @Description: 仓库区域管理
 */
@Slf4j
@Service
public class WarehouseAreaMgmtServiceImpl extends ServiceImpl<WarehouseAreaMgmtMapper, WarehouseAreaMgmt> implements WarehouseAreaMgmtService {


    @Override
    public List<WarehouseAreaMgmt> findByWarehouseCode(String warehouseCode) {
        QueryWrapper<WarehouseAreaMgmt> query = new QueryWrapper<>();
        query.lambda().eq(WarehouseAreaMgmt::getWarehouseCode,warehouseCode)
                .eq(WarehouseAreaMgmt::getRecordStatus, RecordStatusEnu.ENABLE.getValue());
        return baseMapper.selectList(query);
    }


}
